Completed
Push — develop ( c30ec5...06c5d6 )
by Remco
07:42
created

module.exports   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 1
rs 10
c 1
b 0
f 0
1
/**
2
 * Grunt tasks.
3
 *
4
 * @author    Pronamic <[email protected]>
5
 * @copyright 2005-2018 Pronamic
6
 * @license   GPL-3.0-or-later
7
 * @package   Pronamic\WordPress\Pay\Extensions\MemberPress
8
 */
0 ignored issues
show
Coding Style introduced by
There must be exactly one blank line after the file comment
Loading history...
9
module.exports = function( grunt ) {
10
	require( 'load-grunt-tasks' )( grunt );
11
12
	// Project configuration.
13
	grunt.initConfig( {
14
		// Package.
15
		pkg: grunt.file.readJSON( 'package.json' ),
16
17
		// JSHint.
18
		jshint: {
19
			all: [ 'Gruntfile.js', 'composer.json', 'package.json' ]
20
		},
21
22
		// PHP Code Sniffer.
23
		phpcs: {
24
			application: {
25
				src: [
26
					'**/*.php',
27
					'!node_modules/**',
28
					'!vendor/**',
29
					'!wp-content/**'
30
				]
31
			},
32
			options: {
33
				bin: 'vendor/bin/phpcs',
34
				standard: 'phpcs.xml.dist',
35
				showSniffCodes: true
36
			}
37
		},
38
39
		// PHPLint.
40
		phplint: {
41
			all: [ 'src/**/*.php' ]
42
		},
43
44
		// PHP Mess Detector.
45
        phpmd: {
46
            application: {
47
                dir: 'src'
48
            },
49
            options: {
50
                bin: 'vendor/bin/phpmd',
51
                exclude: 'node_modules',
52
                reportFormat: 'xml',
53
                rulesets: 'phpmd.xml.dist'
54
            }
55
        },
56
57
		// PHPUnit.
58
        phpunit: {
59
            options: {
60
                bin: 'vendor/bin/phpunit'
61
            },
62
            application: {}
63
        }
64
	} );
65
66
	// Default task(s).
67
	grunt.registerTask( 'default', [ 'jshint', 'phplint', 'phpmd', 'phpcs' ] );
68
};
69